package com.gitee.mp.extend;

import lombok.Getter;
import lombok.ToString;

/**
 * @author hongda.li
 */
@FunctionalInterface
public interface SimilaritySetter {
    /**
     * 设置相似度
     *
     * @param similarity 相似度
     */
    void setSimilarity(float similarity);

    /**
     * 持有相似度属性的类
     */
    @Getter
    @ToString
    class DefaultSimilaritySetter implements SimilaritySetter {

        protected Float similarity;

        @Override
        public void setSimilarity(float similarity) {
            this.similarity = similarity;
        }
    }
}
